import qs from 'qs';
// 统一管理接口地址
import request from'@/request/request'
// 定义对应的忌口
// 精品接口 封装成函数
export const JingPinAPI=()=>request.get("products/recommend")
// 热门兑换
export const ReMenAPI=()=>request.get("products/hot")
// 发送短信验证码
export const SendSMSAPI = (params) => request.post("/sendSMS", qs.stringify(params));

//手机号验证码登录 
export const PhoneReginAPI = (params) => request.post("/phoneRegin", qs.stringify(params));
// 微信扫码登录
export const WeiXinAPI = (params)=> request.post("/wechatUsers/PCLogin",qs.stringify(params))
// 手机绑定微信
export const BingdingAPI = (params)=> request.post("/wechatUsers/binding",qs.stringify(params))
// 获取用户信息
export const UserProfilesAPI=()=>request.get("/shop/userProfiles")
// 商品详情通过id获取详情页内容
export const GoodDetailsAPI =(id)=>request.get(`/products/${id}`)
// 加入购物车
export const CartsAddAPI = (params) => request.post("/shop/carts/add", qs.stringify(params));
// 全部商品 {did:0,type:0,min:0}
export const GoodsSearchAPI = (params) => request.get(`/products`,{params});//params:params 参数名相同 所以只写一个
// 渲染购物车
export const CartDataAPI =()=>request.get(`/shop/carts`)